﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using OgilvyOne.UKNow.IDAL;
using OgilvyOne.UKNow.DAL;
using OgilvyOne.UKNow.Globalization;

namespace OgilvyOne.UKNow.DALFactory
{
   public  class EventsDateFactory
    {
        public static readonly IDAlEventsDate ChineseEventsDAL = new EventsDateDAL(LanguageType.cn);
        public static readonly IDAlEventsDate EnglishEventsDAL = new EventsDateDAL(LanguageType.en);

        public static IDAlEventsDate Creat(int langID) {
            if (((LanguageType)Enum.Parse(typeof(LanguageType), langID.ToString())) == LanguageType.cn)
                return ChineseEventsDAL;
            else
                return EnglishEventsDAL;
        }
    }
}
